package org.sy.lab.Java7并发编程实战.七定制并发类.十实现自己的原子对象;

public class Sensor1 implements Runnable {
	private ParkingCounter counter;
	public Sensor1(ParkingCounter counter) {
		this.counter = counter;
	}
	@Override
	public void run() {
		counter.carIn();
		counter.carIn();
		counter.carIn();
		counter.carIn();
		counter.carOut();
		counter.carOut();
		counter.carOut();
		counter.carIn();
		counter.carIn();
		counter.carIn();
	}
}
